3.5.1 \(\int x^2 (a+b \log (c (d+e \sqrt {x})^n)) \, dx\) [401]

Optimal. Leaf size=134 \[ \frac {b d^5 n \sqrt {x}}{3 e^5}-\frac {b d^4 n x}{6 e^4}+\frac {b d^3 n x^{3/2}}{9 e^3}-\frac {b d^2 n x^2}{12 e^2}+\frac {b d n x^{5/2}}{15 e}-\frac {1}{18} b n x^3-\frac {b d^6 n \log \left (d+e \sqrt {x}\right )}{3 e^6}+\frac {1}{3} x^3 \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right ) \]

[Out]

-1/6*b*d^4*n*x/e^4+1/9*b*d^3*n*x^(3/2)/e^3-1/12*b*d^2*n*x^2/e^2+1/15*b*d*n*x^(5/2)/e-1/18*b*n*x^3-1/3*b*d^6*n*
ln(d+e*x^(1/2))/e^6+1/3*x^3*(a+b*ln(c*(d+e*x^(1/2))^n))+1/3*b*d^5*n*x^(1/2)/e^5

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 134, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {2504, 2442, 45} \begin {gather*} \frac {1}{3} x^3 \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )-\frac {b d^6 n \log \left (d+e \sqrt {x}\right )}{3 e^6}+\frac {b d^5 n \sqrt {x}}{3 e^5}-\frac {b d^4 n x}{6 e^4}+\frac {b d^3 n x^{3/2}}{9 e^3}-\frac {b d^2 n x^2}{12 e^2}+\frac {b d n x^{5/2}}{15 e}-\frac {1}{18} b n x^3 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2*(a + b*Log[c*(d + e*Sqrt[x])^n]),x]

[Out]

(b*d^5*n*Sqrt[x])/(3*e^5) - (b*d^4*n*x)/(6*e^4) + (b*d^3*n*x^(3/2))/(9*e^3) - (b*d^2*n*x^2)/(12*e^2) + (b*d*n*
x^(5/2))/(15*e) - (b*n*x^3)/18 - (b*d^6*n*Log[d + e*Sqrt[x]])/(3*e^6) + (x^3*(a + b*Log[c*(d + e*Sqrt[x])^n]))
/3

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 2504

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[I
nt[x^(Simplify[(m + 1)/n] - 1)*(a + b*Log[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p,
 q}, x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) &&  !(EqQ[q, 1] && ILtQ[n, 0] &&
 IGtQ[m, 0])

Rubi steps

\begin {align*} \int x^2 \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right ) \, dx &=2 \text {Subst}\left (\int x^5 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx,x,\sqrt {x}\right )\\ &=\frac {1}{3} x^3 \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )-\frac {1}{3} (b e n) \text {Subst}\left (\int \frac {x^6}{d+e x} \, dx,x,\sqrt {x}\right )\\ &=\frac {1}{3} x^3 \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )-\frac {1}{3} (b e n) \text {Subst}\left (\int \left (-\frac {d^5}{e^6}+\frac {d^4 x}{e^5}-\frac {d^3 x^2}{e^4}+\frac {d^2 x^3}{e^3}-\frac {d x^4}{e^2}+\frac {x^5}{e}+\frac {d^6}{e^6 (d+e x)}\right ) \, dx,x,\sqrt {x}\right )\\ &=\frac {b d^5 n \sqrt {x}}{3 e^5}-\frac {b d^4 n x}{6 e^4}+\frac {b d^3 n x^{3/2}}{9 e^3}-\frac {b d^2 n x^2}{12 e^2}+\frac {b d n x^{5/2}}{15 e}-\frac {1}{18} b n x^3-\frac {b d^6 n \log \left (d+e \sqrt {x}\right )}{3 e^6}+\frac {1}{3} x^3 \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 131, normalized size = 0.98 \begin {gather*} \frac {a x^3}{3}-\frac {1}{3} b e n \left (-\frac {d^5 \sqrt {x}}{e^6}+\frac {d^4 x}{2 e^5}-\frac {d^3 x^{3/2}}{3 e^4}+\frac {d^2 x^2}{4 e^3}-\frac {d x^{5/2}}{5 e^2}+\frac {x^3}{6 e}+\frac {d^6 \log \left (d+e \sqrt {x}\right )}{e^7}\right )+\frac {1}{3} b x^3 \log \left (c \left (d+e \sqrt {x}\right )^n\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^2*(a + b*Log[c*(d + e*Sqrt[x])^n]),x]

[Out]

(a*x^3)/3 - (b*e*n*(-((d^5*Sqrt[x])/e^6) + (d^4*x)/(2*e^5) - (d^3*x^(3/2))/(3*e^4) + (d^2*x^2)/(4*e^3) - (d*x^
(5/2))/(5*e^2) + x^3/(6*e) + (d^6*Log[d + e*Sqrt[x]])/e^7))/3 + (b*x^3*Log[c*(d + e*Sqrt[x])^n])/3

________________________________________________________________________________________

Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int x^{2} \left (a +b \ln \left (c \left (d +e \sqrt {x}\right )^{n}\right )\right )\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*ln(c*(d+e*x^(1/2))^n)),x)

[Out]

int(x^2*(a+b*ln(c*(d+e*x^(1/2))^n)),x)

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 104, normalized size = 0.78 \begin {gather*} \frac {1}{3} \, b x^{3} \log \left ({\left (\sqrt {x} e + d\right )}^{n} c\right ) + \frac {1}{3} \, a x^{3} - \frac {1}{180} \, {\left (60 \, d^{6} e^{\left (-7\right )} \log \left (\sqrt {x} e + d\right ) + {\left (30 \, d^{4} x e - 60 \, d^{5} \sqrt {x} - 20 \, d^{3} x^{\frac {3}{2}} e^{2} + 15 \, d^{2} x^{2} e^{3} - 12 \, d x^{\frac {5}{2}} e^{4} + 10 \, x^{3} e^{5}\right )} e^{\left (-6\right )}\right )} b n e \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*(d+e*x^(1/2))^n)),x, algorithm="maxima")

[Out]

1/3*b*x^3*log((sqrt(x)*e + d)^n*c) + 1/3*a*x^3 - 1/180*(60*d^6*e^(-7)*log(sqrt(x)*e + d) + (30*d^4*x*e - 60*d^
5*sqrt(x) - 20*d^3*x^(3/2)*e^2 + 15*d^2*x^2*e^3 - 12*d*x^(5/2)*e^4 + 10*x^3*e^5)*e^(-6))*b*n*e

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 113, normalized size = 0.84 \begin {gather*} -\frac {1}{180} \, {\left (30 \, b d^{4} n x e^{2} + 15 \, b d^{2} n x^{2} e^{4} - 60 \, b x^{3} e^{6} \log \left (c\right ) + 10 \, {\left (b n - 6 \, a\right )} x^{3} e^{6} + 60 \, {\left (b d^{6} n - b n x^{3} e^{6}\right )} \log \left (\sqrt {x} e + d\right ) - 4 \, {\left (15 \, b d^{5} n e + 5 \, b d^{3} n x e^{3} + 3 \, b d n x^{2} e^{5}\right )} \sqrt {x}\right )} e^{\left (-6\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*(d+e*x^(1/2))^n)),x, algorithm="fricas")

[Out]

-1/180*(30*b*d^4*n*x*e^2 + 15*b*d^2*n*x^2*e^4 - 60*b*x^3*e^6*log(c) + 10*(b*n - 6*a)*x^3*e^6 + 60*(b*d^6*n - b
*n*x^3*e^6)*log(sqrt(x)*e + d) - 4*(15*b*d^5*n*e + 5*b*d^3*n*x*e^3 + 3*b*d*n*x^2*e^5)*sqrt(x))*e^(-6)

________________________________________________________________________________________

Sympy [A]
time = 3.83, size = 128, normalized size = 0.96 \begin {gather*} \frac {a x^{3}}{3} + b \left (- \frac {e n \left (\frac {2 d^{6} \left (\begin {cases} \frac {\sqrt {x}}{d} & \text {for}\: e = 0 \\\frac {\log {\left (d + e \sqrt {x} \right )}}{e} & \text {otherwise} \end {cases}\right )}{e^{6}} - \frac {2 d^{5} \sqrt {x}}{e^{6}} + \frac {d^{4} x}{e^{5}} - \frac {2 d^{3} x^{\frac {3}{2}}}{3 e^{4}} + \frac {d^{2} x^{2}}{2 e^{3}} - \frac {2 d x^{\frac {5}{2}}}{5 e^{2}} + \frac {x^{3}}{3 e}\right )}{6} + \frac {x^{3} \log {\left (c \left (d + e \sqrt {x}\right )^{n} \right )}}{3}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*ln(c*(d+e*x**(1/2))**n)),x)

[Out]

a*x**3/3 + b*(-e*n*(2*d**6*Piecewise((sqrt(x)/d, Eq(e, 0)), (log(d + e*sqrt(x))/e, True))/e**6 - 2*d**5*sqrt(x
)/e**6 + d**4*x/e**5 - 2*d**3*x**(3/2)/(3*e**4) + d**2*x**2/(2*e**3) - 2*d*x**(5/2)/(5*e**2) + x**3/(3*e))/6 +
 x**3*log(c*(d + e*sqrt(x))**n)/3)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 271 vs. \(2 (104) = 208\).
time = 5.63, size = 271, normalized size = 2.02 \begin {gather*} \frac {1}{180} \, {\left (60 \, b x^{3} e \log \left (c\right ) + 60 \, a x^{3} e + {\left (60 \, {\left (\sqrt {x} e + d\right )}^{6} e^{\left (-5\right )} \log \left (\sqrt {x} e + d\right ) - 360 \, {\left (\sqrt {x} e + d\right )}^{5} d e^{\left (-5\right )} \log \left (\sqrt {x} e + d\right ) + 900 \, {\left (\sqrt {x} e + d\right )}^{4} d^{2} e^{\left (-5\right )} \log \left (\sqrt {x} e + d\right ) - 1200 \, {\left (\sqrt {x} e + d\right )}^{3} d^{3} e^{\left (-5\right )} \log \left (\sqrt {x} e + d\right ) + 900 \, {\left (\sqrt {x} e + d\right )}^{2} d^{4} e^{\left (-5\right )} \log \left (\sqrt {x} e + d\right ) - 360 \, {\left (\sqrt {x} e + d\right )} d^{5} e^{\left (-5\right )} \log \left (\sqrt {x} e + d\right ) - 10 \, {\left (\sqrt {x} e + d\right )}^{6} e^{\left (-5\right )} + 72 \, {\left (\sqrt {x} e + d\right )}^{5} d e^{\left (-5\right )} - 225 \, {\left (\sqrt {x} e + d\right )}^{4} d^{2} e^{\left (-5\right )} + 400 \, {\left (\sqrt {x} e + d\right )}^{3} d^{3} e^{\left (-5\right )} - 450 \, {\left (\sqrt {x} e + d\right )}^{2} d^{4} e^{\left (-5\right )} + 360 \, {\left (\sqrt {x} e + d\right )} d^{5} e^{\left (-5\right )}\right )} b n\right )} e^{\left (-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*(d+e*x^(1/2))^n)),x, algorithm="giac")

[Out]

1/180*(60*b*x^3*e*log(c) + 60*a*x^3*e + (60*(sqrt(x)*e + d)^6*e^(-5)*log(sqrt(x)*e + d) - 360*(sqrt(x)*e + d)^
5*d*e^(-5)*log(sqrt(x)*e + d) + 900*(sqrt(x)*e + d)^4*d^2*e^(-5)*log(sqrt(x)*e + d) - 1200*(sqrt(x)*e + d)^3*d
^3*e^(-5)*log(sqrt(x)*e + d) + 900*(sqrt(x)*e + d)^2*d^4*e^(-5)*log(sqrt(x)*e + d) - 360*(sqrt(x)*e + d)*d^5*e
^(-5)*log(sqrt(x)*e + d) - 10*(sqrt(x)*e + d)^6*e^(-5) + 72*(sqrt(x)*e + d)^5*d*e^(-5) - 225*(sqrt(x)*e + d)^4
*d^2*e^(-5) + 400*(sqrt(x)*e + d)^3*d^3*e^(-5) - 450*(sqrt(x)*e + d)^2*d^4*e^(-5) + 360*(sqrt(x)*e + d)*d^5*e^
(-5))*b*n)*e^(-1)

________________________________________________________________________________________

Mupad [B]
time = 0.42, size = 111, normalized size = 0.83 \begin {gather*} \frac {a\,x^3}{3}-\frac {b\,n\,x^3}{18}+\frac {b\,x^3\,\ln \left (c\,{\left (d+e\,\sqrt {x}\right )}^n\right )}{3}+\frac {b\,d\,n\,x^{5/2}}{15\,e}-\frac {b\,d^4\,n\,x}{6\,e^4}-\frac {b\,d^6\,n\,\ln \left (d+e\,\sqrt {x}\right )}{3\,e^6}-\frac {b\,d^2\,n\,x^2}{12\,e^2}+\frac {b\,d^3\,n\,x^{3/2}}{9\,e^3}+\frac {b\,d^5\,n\,\sqrt {x}}{3\,e^5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a + b*log(c*(d + e*x^(1/2))^n)),x)

[Out]

(a*x^3)/3 - (b*n*x^3)/18 + (b*x^3*log(c*(d + e*x^(1/2))^n))/3 + (b*d*n*x^(5/2))/(15*e) - (b*d^4*n*x)/(6*e^4) -
 (b*d^6*n*log(d + e*x^(1/2)))/(3*e^6) - (b*d^2*n*x^2)/(12*e^2) + (b*d^3*n*x^(3/2))/(9*e^3) + (b*d^5*n*x^(1/2))
/(3*e^5)

________________________________________________________________________________________